home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Arsenal - The Cutting Edge of Hacking / Hacker's Arsenal - The Cutting Edge of Hacking.iso / texts / misc / t149.txt < prev    next >
Encoding:
Text File  |  2001-07-11  |  8.2 KB  |  191 lines

  1.                 _CbD_ Tutorial #6
  2.                 Modifying dll's to 
  3.                 give real reg codes
  4.                 Target:VoxPhone 
  5.  
  6.  
  7. Pre Crack notes:
  8.  
  9.     Ok how many of you have wanted to crack a program and
  10.     have it give you the real registration code instead of
  11.     the Sorry you entered a invalid Code message? Hmm
  12.     thought so everyone. ok well that is what this tut is
  13.     all about. This will show you one of many ways to do this
  14.     the program we will be werking with uses a dll to check
  15.     our reg number so this will also give you a little info
  16.     on cracking dll's.
  17.  
  18.  
  19. About the Tut.
  20.  
  21. Target: Vox Phone
  22. where to get it: www.voxware.com
  23. protection type: user ID number / key number
  24. tools needed: Softice, W32dasm, Heiw (Hexeditor)
  25. Tut requested by: JosephCo & nIabI
  26. Crack requested by: DarkNight
  27.  
  28.  
  29.     Well if you have ever read any of my tut's then you are 
  30.     aware of my style of cracking, Step by Step is the
  31.     nest way for newbies to follow IMHO so that is how this
  32.     tut will flow. 
  33.  
  34. Pre Crack notes
  35.     You will need to run the program while you are on the net
  36.     then disconect so you can use the BreakPoint we will need
  37.     if you try to do this online you will break every time 
  38.     your system gets info from your ISP but the program will 
  39.     not start if you are not online so make sure your online
  40.     when you start then log off. Also you will have to click
  41.     on [help] register  then fill out the form and tell the 
  42.     you are going to send your registration in by mail
  43.     then you will be able to enter a registration number 
  44.     after that.
  45.  
  46. Step 1:
  47.  
  48.     ok lets start by setting the Break Points we will need in Softice
  49.     the one we will use first is GETDLGITEMTEXTA so set that in si
  50.     (BPX GETDLGITEMTEXTA)then press ctrl-d to return to our
  51.     program. Now lets go back to [help] and register and you 
  52.     will see the box asking for a regcode. enter anything you want
  53.     as long as it fills the box or is atleast 10 digits long
  54.     and then press unlock.
  55.  
  56. Step 2: 
  57.     you should be in Softice now at the point that our program 
  58.     called the getdlgitemtexta function. press F11 to get back to 
  59.     the code that called this. you should see something like the 
  60.     code below
  61.  
  62.   0137:00691ESC  CALL     [USER32!GetDlgItemTextA]  <-- Call to get 
  63.   0137:00691B92  MOV      ECX,PFFFFFFF                  our unlock code 
  64.   0137:00691E97  SUB      EAX,EAX                          
  65.   0137:00691E99  REPNZ  SCASB                              
  66.   0137:00691E9B  NOT      ECX                              
  67.   0137:00691E9D  DEC      ECX                              
  68.   0137:00691E9E  CMP      ECX,OA    <-- Check to see if code is 10 digits
  69.   0137:00691EA1  JZ       00691EE3        <-- Jump if is               
  70.   0137:00691EA3  LEA      EAX,[ESP+74]    <-- set msg for invalid code                 
  71.   0137:00691EA7  PUSH     006AC444                         
  72.   0137:00691EAC  PUSH     EAX            <-- save msg                  
  73.   0137:00691BAD  CALL     006A0370                         
  74.   0137:00691EB2  LEA      EAX,[ESP+7C]                     
  75.   0137:00691EB6  ADD      ESP,OS                           
  76.   0137:00691EB9  PUSH     30                              
  77.  
  78.     ok as you can see here the program checks to see if we entered
  79.     a code that is 10 digits long and if we did then it will jump
  80.     to the code below if not then it displays a invalid code msg
  81.  
  82.   0137;00691EE2  RET                            
  83.   0137:00691EE3  MOV      EDI  ,006B3ADO <-- we land here if code is 10   
  84.   0137:00691EB8  MOV      ECX  ,FPFFFFFF        
  85.   0137:00691EED  SUB      EAX  ,SAX             
  86.   
  87.     ok now you will have to press F10 to single step though the code
  88.     till you come to the code below.
  89.  
  90.  
  91.   0137  :00691F1E   CALL  006936EO   <-- Generate real code here
  92.   0137  :00691F23   LEA  ECX,ESP+4C) <-- if we do a ED ESP+4c here we get
  93.   0137  :00691F27   ADD  ESP,OC               the real code        
  94.   0137  :00691F2A   PUSH  006B84BO     
  95.   0137  :00691F2P   PUSH  ECX         <-- Save real code 
  96.   0137  :00691230   CALL  006AA980    <-- call to compare our code with 
  97.   0137  :00691F35   ADD  ESP,OB          real code.
  98.  
  99.         I have skiped some code here just scroll down and
  100.         you will see this.
  101.  
  102.   0137:00691F3A  MOV    EAX,[006B78B4]        
  103.   0137:00691F3F  JNZ    00691F53       <-- jump if code is invalid          
  104.   0137:00691F41  MOV    WORD PTR [EAX+04],0001
  105.   0137:00691F47  XOR    EAX,EAX               
  106.   0137:00691F49  POP    EDI                   
  107.   0137;00691F4A  POP    ESI                   
  108.   0137:00691F4B  POP    EBX                   
  109.   0137:00691F4C  ADD    ESP,00000130          
  110.   0137:00691F52  RET                          
  111.   0137:00691F53  LEA    ECX,[ESP+74]   <-- set up for invalid code msg       
  112.   0137:00691F57  PUSH   006AC444              
  113.   0137:00691F5C  MOV    WORD PTR [EAX+04,0000
  114.   0137:00691F62  PUSH   ECX                   
  115.   0137:00691P63  CALL   006A0370              
  116.   0137:00691F68  LEA    ECX,[ESP+7C] (this may not be 7C as i cant remeber         
  117.                     i had changed it before i wrote     
  118.                     down the code) This is where we
  119.                     will make our change inorder to
  120.                     get our real number.
  121.  
  122.  
  123.     Ok damn that is a lot of code. well what is happening here is
  124.     our program (the Rsagnt32.dll is getting ready to give us
  125.     that damn " Sorry you fucked up message" the program
  126.     copies the strings we will see in the messagebox right here
  127.     to ECX then will push ECX in a few lines down but we dont want
  128.     it to push the message we want it to push our real code, dont
  129.     we. So we will need to make a few changes here. rememeber where i
  130.     siad our real code was?
  131.  
  132. :00691F23   LEA  ECX,ESP+4C) <-- if we do a ED ESP+4c here we get
  133. :00691F27   ADD  ESP,OC               the real code        
  134.     
  135.     well do you think you see what needs to be done?
  136.     yeah change the esp+7c to esp+4c right?  Nope that want work.
  137.     If you do that you will only get the last 5 letters of the code
  138.     because the code starts before 4c do we need to do a ED esp+4c
  139.     and see what we get.  hmm well what we want to see is our code
  140.     start on the first line of the data window like below
  141.  
  142. :009BEBD4 49505848  544E4A54  00005443  00000004  HXPITJNTCT.. .     
  143. :009BEEE4 00000000  00000000  02EF005C  02EF0004                  
  144. :009BEEF4 034P3AAO  02EF7E3B  7P1R0500  18078394  0.> .....0....  
  145. :009BEF04 00004389  00000000  382780D4  40000000  C........'8...0     
  146.  
  147.     now to do this we will have to play with ESP so to save you time
  148.     i have found that ESP+48 will do the trick.
  149.     so what we will need to do is change LEA ECX,[ESP+7C] to
  150.     LEA ECX,[ESP+48]  this will yield us a real code every time
  151.     in the place of that damn "Sorry you Fucked up message"
  152.     so now you can do one of 2 things (1) restart the registraion 
  153.     process and when you get to the line with LEA ECX,[ESP+7C] on it
  154.     do a ED xxxx:00691F68 then write down what you see in the data 
  155.     window so you can change it or i will give you the info
  156.     you willl need when you run your hexeditor
  157.  
  158.     you will need    8D4C247C83C408    do a search for that in your
  159.     hexeditor (use Hiew it is the best) and replace the 7C with 48
  160.     and then save your file (make a back up before you do this though)
  161.     now when you run the program you will get a message that tell you     
  162.     that a dll is corupted go on to the next step to fix that
  163.  
  164. step 3:
  165.     in the Main program file tx32.exe do the following:
  166.     ok in hiew search for 85C0752C50  then edit it in code mode
  167.     and change the jnz to jz or visa versa then there is one more
  168.     search for 85C0752E33FF  and change its jnz to jz or visa versa
  169.     i cant remember if they are jnz or jz  but what ever it is change
  170.     to the opisite. or you can do a BPX MESSAGEBOXA and find the 
  171.     jumps on your own. (Hint addresses are :0041CD27 & :0041D267)
  172.     well that is about it after you make the changes you can run the 
  173.     program and get you real number from it  then register it.
  174.     Sorry if this is not as clear as most of my tut's but i only wrote 
  175.     down the code that i needed while i was cracking and make notes
  176.     about the rest so if you have any trouble just find me on EFNET
  177.     in #cracking4newbies and i will be glad to explain.
  178.  
  179.     Oh yeah you cant unregister the program after you register it 
  180.     so make sure you get a good understanding of how it all werks
  181.     before you regiters the program.
  182.  
  183.  
  184.     Hope this Helps you to better understand Dll cracking and
  185.     makeing a msg box show you the real reg codes for your
  186.     program. _CbD_
  187.  
  188.     Greetz to :
  189.     josephCo, nIabI, Mornings, ^pain^, drlan, mp, razzi and 
  190.     all the rest of #Cracking4newbies 
  191.